[<<Previous Entry]
[^^Up^^]
[Next Entry>>]
[Menu]
[About The Guide]
moverel() Move Current Position (CP) a Relative Distance
#include <graphics.h>
void far moverel(x1,y1);
int x1;
int y1;
moverel() moves the current position (CP) to a new position relative
to it. The position is moved 'x1' pixels in the x direction and 'y1'
pixels in the y position.
Returns: Nothing.
-------------------------------- Example ---------------------------------
The following statements draw a triangle after moving the current
position (CP) from initial coordinates (0,0).
#include <graphics.h>
#include <conio.h>
main()
{
int gdriver = DETECT;
int gmode;
initgraph(&gdriver,&gmode,"");
moverel(300,200);
linerel(100,100);
linerel(-100,0);
linerel(0,-100);
getch();
closegraph();
}
See Also:
moveto()
This page created by ng2html v1.05, the Norton guide to HTML conversion utility.
Written by Dave Pearson